<template>
    <div id="page1">
    <div id="navigationbar">
         <el-row class="tac">
    <el-col :span="12">
      <h5 class="mb-2">ERP(资源管理系统)</h5>
      <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="2"
        text-color="#fff"
        @open="handleOpen"
        @close="handleClose">
        <el-sub-menu index="1">
        <template #title>
            <el-icon><location /></el-icon>
            <span>基础信息管理</span>
        </template>
        <el-menu-item-group>
            <el-menu-item index="1-1"><RouterLink to="/PageTop/shangping">商品信息</RouterLink></el-menu-item>
            <el-menu-item index="1-2"><RouterLink to="/PageTop/changku">仓库信息</RouterLink></el-menu-item>
            <el-menu-item index="1-3"><RouterLink to="/PageTop/kehu">客户信息</RouterLink></el-menu-item>
            <el-menu-item index="1-4"><RouterLink to="/PageTop/gongyingshang">供应商信息</RouterLink></el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group>
        </el-menu-item-group>
        </el-sub-menu> 
        <el-menu-item index="2">
        <el-icon><setting /></el-icon>
        <span><RouterLink to="/PageTop/gerenzhongxing">个人中心</RouterLink></span>
        </el-menu-item>
        </el-menu>
    </el-col>
    </el-row>
    </div>
    <div id="tou">
        <RouterView></RouterView>
    </div>
    </div>
</template>
<script>
// import {RouterLink,RouterView} from 'vue-router'
import { onMounted } from 'vue';
import Bag from "./Axios.js"
import { useCommoditydata } from "@/store/Request.js"
export default {
name:'PageTop',
setup(){
    
    async function aa(){
        await Bag.get("http://localhost:8080/admin/getProduct?page=1&pageSize=10").then(require=>{
            // console.log("@@@@",require.data.data.records);
            const data=useCommoditydata()
            data.data=require.data.data.records
            data.total=require.data.data.total
        })
        
    }
    onMounted(()=>{
        aa()
    })
    return{
        aa
    }
}
}
</script>


<style scoped>
#page1{
    position:relative;
    width: 100%;
    height: 100%;
    /* background-color: crimson; */
}
#navigationbar{
    position:absolute;
    /* left:30%; */
    width: 30%;
    height: 100%;
    /* background-color:#545c64 ; */
}
#tou{
    position:absolute;
    width:86% ;
    height: 100%;
    left:15%;
    /* top: 20px; */
    /* background-color: blue; */
}
</style>